from django.urls import path
from rest_framework.routers import SimpleRouter

from user.views import UserName, UserMobile, UserView, address, change_title

router = SimpleRouter()
# 注册资源 /api/user/username/ /api/user/username/[id]/
router.register('username', UserName)
router.register('mobiles', UserMobile)
# 注册资源 /api/user/auth/  /api/user/auth/[id]/
router.register('auth', UserView)
# router.register('addresses', UserAddress)



urlpatterns=[
    path('addresses/', address),
    path('addresses/<int:id>/title/', change_title),

]

urlpatterns += router.urls